package com.example.service;

import com.example.entity.Person;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author およそ神
 * @version JDK 1.8
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-PERSON",fallbackFactory = MyFactory.class)
public interface FeignService {
    @GetMapping("/person/addPerson")
    boolean addPerson( Person person);

    @GetMapping("/person/searchById/{id}")
    Person searchById(@PathVariable("id") Integer id);

    @GetMapping("/person/searchAll")
    List<Person> searchAll();

}
